package portal.controller;

import org.springframework.web.bind.annotation.RequestMapping;

import portal.common.MesageCode;
import portal.common.ResultData;
import utils.Log4jInit;
@RequestMapping("/rest/v1")
public class BaseController {
	
	protected void println(String... str){
		//for(int i=0;i<str.length;i++)
			Log4jInit.logger.info(str.toString());
	}
	protected ResultData success(){
		return success("success");
	}
	protected ResultData success(String mes){
		return new ResultData(MesageCode.SUCCESS,mes);
	}
	protected ResultData success(Object obj){
		return new ResultData(MesageCode.SUCCESS,"success",obj);
	}
	protected ResultData error(){
		return error("error");
	}
	protected ResultData error(String mes){
		return new ResultData(MesageCode.ERROR,mes);
	}
}
